<!DOCTYPE html>
<html devsite>
  <head>
    <title>TensorFlowLiteSwift Framework Reference</title>
    <link rel="stylesheet" href="../css/jazzy.css" />
    <meta charset='utf-8'>
  </head>
  <body>
    <div class="content-wrapper">
      <article class="main-content">
        <section>
          <section class="section">
            <h1>QuantizationParameters</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">QuantizationParameters</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>

                </div>
              </div>
            <p>Parameters that determine the mapping of quantized values to real values. Quantized values can
be mapped to float values using the following conversion:
<code>realValue = scale * (quantizedValue - zeroPoint)</code>.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift22QuantizationParametersV5scaleSfvp"></a>
                    <a name="//apple_ref/swift/Property/scale" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift22QuantizationParametersV5scaleSfvp">scale</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The difference between real values corresponding to consecutive quantized values differing by</p>

<ol>
<li>For example, the range of quantized values for <code>UInt8</code> data type is [0, 255].</li>
</ol>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">scale</span><span class="p">:</span> <span class="kt">Float</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:19TensorFlowLiteSwift22QuantizationParametersV9zeroPointSivp"></a>
                    <a name="//apple_ref/swift/Property/zeroPoint" class="dashAnchor"></a>
                    <h3><a class="token" href="#/s:19TensorFlowLiteSwift22QuantizationParametersV9zeroPointSivp">zeroPoint</a></h3>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The quantized value that corresponds to the real 0 value.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="objc">
                          <p class="aside-title-objc">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">zeroPoint</span><span class="p">:</span> <span class="kt">Int</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>          </section>
        </section>
      </article>
    </div>
  </body>
</html>
